package boerse.main.Asset;

import boerse.main.Exceptions.*;

public class Share {
	private final String name;
	private long price;
	
	public Share (String name, long price) {
		this.name = name;
		this.price = price;
	}

	public long getPrice() {
		return price;
	}

	public void setPrice(long price) throws NegativeValueException{
		if (price < 0)
			throw new NegativeValueException();
		this.price = price;
	}

	public String getName() {
		return name;
	}
	
	public String toString() {
		return name + "\t\t" + price;
	}
	
}
